
// 基于template/src/views/{{appModules}}/{{pages@DEREPORTVIEW}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	ReportViewActionType,
	ReportViewController,
	IReportViewAbility,
	IReportViewControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	useReportViewProps,
	useReportViewBasic,
	useReportViewControllerParams,
    useReportViewAction,
} from '@/hooks/view/use-report-view';
import { model } from "./avue-test-usr-0309389863-report-view-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...useReportViewProps()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...useReportViewBasic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...useReportViewAction(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<ReportViewActionType, IReportViewAbility>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<ReportViewActionType, IReportViewAbility>>
) {
	const params: IReportViewControllerParams<
		ReportViewActionType,
		IReportViewAbility
	> = useReportViewControllerParams(model, props, evt);
	return new ReportViewController(params);
}